<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>舆情工作平台</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />   
    <style>     
     
     /* 头部样式 */
     .topbar {background: #3A8B7A; height:50px; border-bottom: 1px solid #DDDFE3; }
     #title { color:#FFF;} 
     .swipe {line-height: 50px;margin-right: 10px;color: #FF8400;}
     .back {float: left; padding-right: 30px;}
     .back img {height: 22px;margin-top: 15px;margin-left: 10px;margin-bottom: 10px;}
     .topbar .title {line-height: 50px; font-size: 22px;  position: absolute; left: 50%; -webkit-transform: translateX(-50%);transform: translateX(-50%);}
      
     /* 底部切换按钮样式 */
     ul {display: -webkit-box; display: -webkit-flex; display: flex; }
     #footer {height: 91px; line-height: 91px; background-color: #FAFAFA;border-top: 1px solid #e0e0e0; }
     #footer li{-webkit-box-flex: 1; -webkit-flex: 1; flex:1; height: 80px; margin-top:10px;}
 
     /* 底部按钮样式 */
     /********************/
     .bbtn01 {background: url(../image/btn/yqcz_button.png) no-repeat center 4px; }
     .bbtn02 {background: url(../image/btn/rdzz_button.png) no-repeat center 4px; }
     .bbtn03 {background: url(../image/btn/yqfx_button.png) no-repeat center 4px; }
     .bottom_btn {width: 99%;  height: 50px;color:red;padding-top: 18px;background-position:center; background-size: 50px;  font-size: 12px;}
     .bottom_btn>b{position:relative; left: 35px; bottom:60px; font-weight: bold;}
     
     
     /* 本地刷新图标 */
     #localrefresh {display:none;float: right; width: 40px; padding: 5px 10px;}

    </style>
  </head>
  <body>
    <div id="wrap">  
      <div id="thridHeader" class="titlebar activebar">
        <div class="topbar whitebar">
          <div class="back"  tapmode="" onclick="api.openSlidPane({type:'left'});"><img src="../image/btn/side_button.png" alt=""></div>
          <div class="title" id="title">每日要情</div>
            </div>       
       </div>           
      <div id="main">       
      </div>      
      <div id="footer">         
        <ul>
          <li tapmode="activebtn0 activebtn" onclick="management()">
            <a class="bottom_btn bbtn01 weixin"><b id="number"></b></a>
          </li>
          <li tapmode="activebtn1 activebtn" onClick="openWin('hot_spot')">
            <a class="bottom_btn bbtn02 communicate"> </a>
          </li>
          <li tapmode="activebtn2 activebtn" onClick="analysis('')">
            <a class="bottom_btn bbtn03 discover"> </a>
          </li> 
        </ul>
      </div>
    </div>
    <input id="access_token" type="hidden" value=""/>
    <input id="admin_id" type="hidden" value=""/>
  </body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/api.data.js"></script>
<script type="text/javascript" src="../script/jquery.md5.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/echarts-all.js"></script>
 
<script type="text/javascript">
      // 完成首页初始化
    apiready = function(){
         //在页面制定位置输出接口所需的access_token和admin_id
         get_sign();   
         //等待两秒传递完access_token和admin_id后执行初始化数据
         get_number();
         
         api.lockSlidPane();
         //返回按钮关闭页面,可以使用runBackground需要注册话费1元执行退到后台运行    
         var isAndroid = (/android/gi).test(navigator.appVersion);
         api.addEventListener({name: 'keyback'}, function(ret, err){
            api.closeWidget();
         });

        //获取头部和底部的相关信息，计算子窗口的高度及y坐标
        header = $api.byId('thridHeader');       
        $api.fixIos7Bar(header);     
        headerOffset = $api.offset(header);

        var footer = $api.byId('footer');
        var footerPos = $api.offset(footer);
     
        // 第一次进入打开 默认显示每日要情
        
        api.openFrame ({
            name: 'unifiedList',
            url: './unifiedList.html',
            rect:{
            x:0,
            y:headerOffset.h,
            w:'auto',
            h:api.frameHeight-headerOffset.h -footerPos.h
            },
            delay: 300,
            pageParam: {category:"mryq"},
            vScrollBarEnabled:true,          
            hScrollBarEnabled:false,  
            scaleEnabled:true,           
        });
      
    };

   function get_number(){
         setTimeout(function(){countSort("indexMain","load");},500);
         
   }
   
    // ===================================
    // 响应底部按钮的切换frame
    // ===================================
   function openWin(category){    
                         
        api.openWin({
            name: 'unifiedWin',
            url: './unifiedWin.html',
            delay: 300,
            bounces: false,
            vScrollBarEnabled:false,
            hScrollBarEnabled:true,
            pageParam: {category:category}
        });    
    }
    
    //舆情处置页面
    function management(){
       api.openWin({
            name: 'managementWin',
            url: './managementWin.html',
            delay: 300,
            bounces: false,
            vScrollBarEnabled:false,
            hScrollBarEnabled:true,
        });          
    }
    
    //yuqing fenxi 
    function analysis(){
       api.openWin({
            name: 'analysisWin',
            url: './analysisWin.html',
            delay: 300,
            bounces: false,
            vScrollBarEnabled:false,
            hScrollBarEnabled:true,
        });        
    }
    
    

  
  </script>
</html>